package com.example.its2019001;

import android.app.Dialog;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;

public class login extends AppCompatActivity {

    private TextView tvLoginTitle;
    private EditText edtLoginUser;
    private EditText edtLoginPsw;
    private Button btnLogin;
    private void netsettingDialog(){
        AlertDialog.Builder builder=new AlertDialog.Builder( login.this );
        View view= LayoutInflater.from(login.this).inflate(R.layout.netsetting_dialog,null,false  );
        builder.setView( view );
        final Dialog dialog=builder.create();
        dialog.show();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate( savedInstanceState );
        setContentView( R.layout.activity_login );
        initView();

        btnLogin.setOnClickListener( new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                netsettingDialog();

            }
        } );
    }

    private void initView() {
        tvLoginTitle = (TextView) findViewById( R.id.tvLoginTitle );
        edtLoginUser = (EditText) findViewById( R.id.edtLoginUser );
        edtLoginPsw = (EditText) findViewById( R.id.edtLoginPsw );
        btnLogin = (Button) findViewById( R.id.btnLogin );
    }
}